/**
 * Created by wangshaohua on 2018/1/25.
 */
moduleOrganizationClient.controller("OrganizationClientUserChangePassword", function (OrganizationClientUserResource, $scope, $log, $state, $stateParams, GeneralResource, LoadingService, ConstantService, DialogService) {
    initPage($scope);
    $scope.$on("ngDialog.opened", function () {
        dialogOnLoad();
    });

    // ------------------------------------------------------------------------------------------------------

    $scope.cancel = function () {
        DialogService.close();
    };

    $scope.changePassword = function () {
        Alert.confirm(function () {
            OrganizationClientUserResource.changePassword({}, $scope.currentUser, function () {
                Alert.success();
                DialogService.close();
            });
        })
    }
});